home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
music
/
omdpt123.lha
/
OMED_PT123.lzx
/
rexx
/
replace_cmd.omed
< prev
next >
Wrap
Text File
|
2004-03-03
|
2KB
|
82 lines
/* Replace a command - Feril 13-01-96 */
address OCTAMED_REXX
options results
'wi_request "If the command at the current position is the searched click OK!" "OK|Cancel"'
if result = 0 then exit
'ed_getdata CMDNUM'; scmd = result
'ed_getdata QUAL'; squal = result
do forever
'wi_request "Go to the cmd to be inserted and click OK" "Ok|<-|->|^|v|Cancel"'
if result = 0 then exit
if result = 2 then ed_gototrack prevnote
if result = 3 then ed_gototrack nextnote
if result = 4 then ed_advanceline up
if result = 5 then ed_advanceline down
if result = 1 then leave
end
'ed_getdata CMDNUM'; dcmd = result
'ed_getdata QUAL'; dqual = result
'wi_request "Do you want OMED to search all sequences?" "Yes|No|Cancel"'
if result = 0 then exit
if result = 1 then seq = 1
else 'ed_getcurrplayseq var seq'
'wi_open playingseq'
'op_update off'
replaced = 0
do_req = 1
'ed_getnumplayseq var numseq'
do until seq = numseq + 1
'ed_getcurrplayseq var seq'
'ed_gotoplayseq' seq
'ed_getplayseqblock' seq; block = result
'ed_getnumlines block' block; numlines = result
'ed_getnumtracks block' block; numtracks = result
track = 0
do until track = numtracks
line = 0
do until line = numlines
'ed_getdata block' block 'track' track 'line' line 'qual'; qual = result
'ed_getdata block' block 'track' track 'line' line 'cmdnum'; cmd = result
wi_showstring "Seq:" seq
if cmd = scmd then do
if qual = squal then do
'ed_goto block' block 'line' line 'track' track
if do_req ~= 0 then do
'op_update on'
'wi_request "Select:" "Replace|Replace All|Skip|Cancel"'
req = result
if req = 0 then do
wi_showstring replaced "replaced"
exit
end
end
if req = 1 then do
'ed_setdata CMDNUM' dcmd 'QUAL' dqual
replaced = replaced + 1
do_req = 1
end
if req = 2 then do
'ed_setdata CMDNUM' dcmd 'QUAL' dqual
replaced = replaced + 1
do_req = 0
end
'op_update off'
end
end
line = line + 1
end
track = track + 1
end
seq = seq + 1
end
wi_showstring replaced "replaced"
'op_update on'